package io.adrainty.bolee.security.feign;

import io.adrainty.bolee.framework.commons.basic.ResultDTO;
import io.adrainty.bolee.security.hystrix.ClientFeignHystrix;
import io.adrainty.bolee.security.models.entity.ClientEntity;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author AdRainty
 * @version V1.0.0
 * @since 2025/8/9 下午7:09
 */

@FeignClient(value = "security-web", path = "/client-feign", fallback = ClientFeignHystrix.class)
public interface IClientFeign {

    /**
     * 获取所有客户端信息
     *
     * @return 客户端信息列表
     */
    @GetMapping("/getClientList")
    ResultDTO<List<ClientEntity>> getClientList();

    /**
     * 获取客户端信息
     *
     * @param clientId 客户端ID
     * @return 客户端信息
     */
    @GetMapping("/getClientEntity")
    ResultDTO<ClientEntity> getClientEntity(@RequestParam("clientId") String clientId);

}
